numOfStudents = eval(input("输入你的学生数：\n"))
max_score0 = 0
max_student0 = ''

max_score1 = 0
max_student1 = ''
for i in range(numOfStudents):
    student = input("请输入名字\n")
    score = eval(input("请输入分数\n"))
    if score > max_score1:
        max_score0 = max_score1
        max_student0 = max_student1
        max_score1 = score
        max_student1 = student
    elif score > max_score0:
        max_score0 = score
        max_student0 = student

print("分数最高的学生姓名为： " + max_student1 + "'，他的分数：" + str(max_score1) )
print("分数第二高的学生姓名为： " + max_student0 + "'，他的分数：" + str(max_score0) )